<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        window.onload=function()
        {
            //1.Object.is判断两个值是否完全相等，与===类似 但又不完全一样
            console.log(Object.is(120,35));
            console.log(Object.is("abd","ABD"));
            console.log(Object.is("a","a"));
            //在判断NaN与NaN是否相等时，===和Object.is是两种结果
            console.log(Object.is(NaN,NaN));//true
            console.log(NaN === NaN);//false

            //2.Object.assign 对象的合作 传入两个参数，后面的参数覆盖前面的参数
            const config1={
                host:"localhost",
                port:3306,
                name:"root",
                pass:"root",
                test:"test",
            };
            const config2={
                host:"http://atguigu.com",
                port:33060,
                name:"atguigu",
                pass:"iloveyou",
                id:"admin"
            };
            console.log(Object.assign(config1,config2));

            //3.Object.serPrototypeOf 设置原型对象
            const school={
                name:"尚硅谷"
            };
            const cities={
                schoolArea:["北京","上海","深圳"]
            };
            Object.setPrototypeOf(school,cities);
            console.log(Object.getPrototypeOf(cities));
            console.log(school);
        };
    </script>
</head>
<body>
    
</body>
</html>